﻿using System;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty
{
    public class AirWallCollision : MonoBehaviour
    {

        public Action<Collision> onCollisonEnter;
        public Action<Collision> onCollisionExit;

        public void OnEnable()
        {
            MeshRenderer ms = GetComponent<MeshRenderer>();
            if (ms)
            {
                ms.enabled = false;
            }
        }


        private void OnCollisionEnter(Collision collision)
        {
            onCollisonEnter?.Invoke(collision);
        }

        private void OnCollisionExit(Collision collision)
        {
            onCollisionExit?.Invoke(collision);
        }
    }
}